#ifndef _INETADDRESS_HH
#define _INETADDRESS_HH

#include <netinet/in.h>
#include <arpa/inet.h>
#include <error.h>
#include <errno.h>
#include <string>

using std::string;

class InetAddress 
{
public:
    InetAddress(string ip, unsigned short port);
    InetAddress(const struct sockaddr_in& addr);
    ~InetAddress();

    string Get_ip();
    unsigned short Get_port();
    struct sockaddr_in *Get_addrptr();

private: 
    struct sockaddr_in _addr;
};

#endif